import articleModule from "@/modules/article";
import { TIP_TAP_DEFAULT } from "@/config/settings";

export default async function getArticleBySlug(slug) {
  let article = await articleModule.getBySlug(slug);
  article = { ...article, content: article.content ? JSON.parse(article.content) : TIP_TAP_DEFAULT };
  return article;
}